using System;
using NUnit.Framework;
using DotNetXmlSwfChart;

namespace DotNetXmlSwfChart.UnitTest
{
    [TestFixture]
    public class AxisValueFixture
    {
        [Test]
        public void ToSourceXml()
        {
            string testXml =
                "<axis_value min='0' " +
                            "max='2.5' " +
                            "steps='1' " +
                            "prefix='pref' " +
                            "suffix='suff' " +
                            "decimals='2' " +
                            "decimal_char='.' " +
                            "separator='sep' " +
                            "show_min='False' " +
                            "font='Arial' " +
                            "bold='False' " +
                            "size='10' " +
                            "color='ffffff' " +
                            "background_color='000000' " +
                            "alpha='1' " +
                            "orientation='diagonal_up' " +
                            "/>";
            AxisValue av = new AxisValue();
            av.Min = 0;
            av.Max = 2.5F;
            av.Steps = 1;
            av.Prefix = "pref";
            av.Suffix = "suff";
            av.Decimals = 2;
            av.DecimalChar = ".";
            av.Separator = "sep";
            av.ShowMin = false;
            av.Font = "Arial";
            av.Bold = false;
            av.Size = 10;
            av.Color = "ffffff";
            av.BackgroundColor = "000000";
            av.Alpha = 1;
            av.Orientation = "diagonal_up";
            Assert.AreEqual(testXml, av.ToSourceXML());
        }
    }
}
